package com.furnitur.modules.portal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.furnitur.modules.portal.dto.furniture.FurnitureQueryDTO;
import com.furnitur.modules.portal.vo.furniture.FurnitureVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PortalFurnitureMapper extends BaseMapper<FurnitureVO> {
    
    /**
     * 分页查询商品列表
     */
    Page<FurnitureVO> selectFurniturePage(Page<FurnitureVO> page, @Param("query") FurnitureQueryDTO query);
    
    /**
     * 查询商品详情
     */
    FurnitureVO selectFurnitureDetail(@Param("id") Long id);

    /**
     * 查询热门商品
     */
    Page<FurnitureVO> selectHotFurniture(Page<FurnitureVO> page);

    /**
     * 查询新品上市商品
     * @param page 分页参数
     * @param sortType 排序类型
     * @return 分页结果
     */
    IPage<FurnitureVO> selectNewFurniture(Page<FurnitureVO> page, String sortType);
} 